const mongoose = require('mongoose');
const schema = new mongoose.Schema({
    username: { type: String },
    password: {
        type: String,
        select: false, //禁止查询
        set(val) {
            return require('bcrypt').hashSync(val, 10) //散列值，散列指数
        }
    }
})
module.exports = mongoose.model('AdminUser', schema, 'adminUser')